package widgets;

import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnTouchListener;

/**
 * 没有onInterceptTouchEvent方法
 * @author Charlie
 *
 */
public class ViewTest extends View implements OnTouchListener, OnClickListener {
	//	private static final String TAG = ViewTest.class.getSimpleName();
	private static final String TAG = "V";

	public ViewTest(Context context, AttributeSet attrs) {
		super(context, attrs);
		//		this.setOnClickListener(this);
		//		this.setOnTouchListener(this);
		Log.v(TAG, "ViewTest");
	}

	@Override
	public boolean onTouchEvent(MotionEvent event) {
		Log.v(TAG, "onTouchEvent");
		return super.onTouchEvent(event);
	}

	@Override
	public boolean dispatchTouchEvent(MotionEvent event) {
		Log.v(TAG, "dispatchTouchEvent");
		return super.dispatchTouchEvent(event);
	}

	@Override
	public void onClick(View v) {
		Log.v(TAG, "onClick");
	}

	@Override
	public boolean onTouch(View v, MotionEvent event) {
		Log.v(TAG, "onTouch");
		return false;
	}
}
